import { NodeStatus, StateTypeEnum } from "../../../common/Enum";
import BTCondition from "../../Base/BTCondition";
import Boss1Tree from "../Tree/Boss1Tree";

/** 是否活着 */
export default class ConditionalNoDead extends BTCondition {

    constructor(
        private tree: Boss1Tree,
    ) {
        super()
    }
    onUpdate(): NodeStatus {
        if (
            this.tree.enemy.state !== StateTypeEnum.dead
        ) {
            return NodeStatus.Success
        }
        return NodeStatus.Failure
    }
}